package com.flute.haflute.jobbox.communication;

import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

import com.flute.haflute.jobbox.communication.messages.MessageBase;

/**
 * 监听器接口，所有RMI监听器实现
 */
public interface Listener extends Remote, Serializable {

	/** 接收消息 */
	public void receive(MessageBase message) throws RemoteException;

	/** 接收消息 */
	public void receive(List<MessageBase> message) throws RemoteException;

	/** 返回监听器的当前状态是否活动 */
	public boolean isAlive() throws RemoteException;
}
